package com.study.example;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {

    @Autowired
    private AmqpTemplate template;

    public void send() {
        for (int i = 0; i < 10000; i++) {
            template.convertAndSend("queue","hello,rabbit~ " +i);
        }

    }

}
